//
// Created by grg on 2020/8/3.
// Copyright (c) 2020 龚任根. All rights reserved.
//

#ifndef TEST_CPP_PROJECT_IBLOCK_H
#define TEST_CPP_PROJECT_IBLOCK_H


#include <SDL2/SDL_events.h>
#include <SDL2/SDL_render.h>
#include "GameWindowConfig.h"

class IBlock {
public:
    virtual void onEvent(const SDL_Event *event) = 0;

    virtual void onDraw() = 0;

    virtual void onPreUpdate() = 0;

    void updateUI(SDL_Texture *imgTexture, SDL_Rect *srcRect, SDL_Rect *desRect) {
        SDL_RenderCopy(gContext->getRender(), imgTexture, srcRect, desRect);
    }
};


#endif //TEST_CPP_PROJECT_IBLOCK_H
